From: Antonio Nino Diaz Date: Fri, 10 Nov 2017 12:25:49 +0000 (+0000) Subject: SPM: Fix pointer to MP info in boot info struct X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=ff7d08052b27fd560dddbe02b88d844ddb799dc6;p=project%2Fbcm63xx%2Fatf.git SPM: Fix pointer to MP info in boot info struct The MP info struct is placed right after the boot info struct. However, when calculating the address of the MP info, the size of the boot info struct was being multiplied by the size of the MP boot info. This left a big gap of empty space between the structs. This didn't break any code because the boot info struct has a pointer to the MP info struct. It was just wasting space. Change-Id: I1668e3540d9173261968f6740623549000bd48db Signed-off-by: Antonio Nino Diaz --- diff --git a/services/std_svc/spm/secure_partition_setup.c b/services/std_svc/spm/secure_partition_setup.c index 6624e2b4..67301608 100644 --- a/services/std_svc/spm/secure_partition_setup.c +++ b/services/std_svc/spm/secure_partition_setup.c @@ -270,8 +270,8 @@ void secure_partition_setup(void) * be populated, just after the boot info. */ ((secure_partition_boot_info_t *) shared_buf_ptr)->mp_info = - ((secure_partition_mp_info_t *) shared_buf_ptr) + - sizeof(secure_partition_boot_info_t); + (secure_partition_mp_info_t *) ((uintptr_t)shared_buf_ptr + + sizeof(secure_partition_boot_info_t)); /* * Update the shared buffer pointer to where the MP information for the